package com.nimitz.module.demo.domain.dto;

import com.nimitz.common.annotation.Excel;
import com.nimitz.module.demo.domain.DemOrderDetail;
import com.nimitz.module.demo.domain.DemUser;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.util.List;

@ApiModel(value = "DemOrderDto", description = "订单入参")
public class DemOrderDto implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 订单编码
     */
    @Excel(name = "订单编码")
    @ApiModelProperty(value = "订单编码")
    private String orderCode;

    private DemUserDto user;

    /**
     * 订单详情集合
     */
    private List<DemOrderDetail> details;

    public String getOrderCode() {
        return orderCode;
    }

    public void setOrderCode(String orderCode) {
        this.orderCode = orderCode;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public DemUserDto getUser() {
        return user;
    }

    public void setUser(DemUserDto user) {
        this.user = user;
    }

    public List<DemOrderDetail> getDetails() {
        return details;
    }

    public void setDetails(List<DemOrderDetail> details) {
        this.details = details;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("orderCode", getOrderCode())
                .append("user", getUser())
                .append("details", getDetails())
                .toString();
    }
}
